package ProjectPanel;


import java.awt.BorderLayout;
 
import java.awt.GridBagConstraints;
 
import java.awt.GridBagLayout;
 
import java.awt.Insets;
 
import java.awt.LayoutManager;
 

 




import javax.swing.JButton;
 
import javax.swing.JLabel;
 
import javax.swing.JPanel;
 
import javax.swing.JTextField;
 





import javax.swing.table.DefaultTableModel;

import java.awt.GridLayout;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class GradeRegistPanel extends JPanel {
 
        private JTextField stdnametf;
        private JTextField stdnotf;
        private JTextField subtottf;
        private JTextField tf5;
        private JTextField departnametf;
        private JTextField subnametf;
        private JTextField profnametf;
        private JTextField totgradetf;
        private JTextField savepointtf;

        public GradeRegistPanel() {
        
                setLayout( new BorderLayout(0,0));
 
                 //   * TOP *
 
                makeTopPanel();
 
                //   * CENTER *
 
                makeCenterPanel();

                //   * BOTTOM *
 
                makeBottomPanel();

        }

        public void makeTopPanel(){
        JPanel top = new JPanel();
        add(top, BorderLayout.NORTH);
 
        JLabel nlb1 = new JLabel("성적을 등록해 주세요.");       
        top.add(nlb1);
        }

        public void makeCenterPanel(){
  
                JPanel center = new JPanel();
                add(center, BorderLayout.CENTER);
                center.setLayout(new GridLayout(9, 2, 0, 0));
                
                JLabel stdno = new JLabel("학생 학번 :");
                center.add(stdno);
                
                stdnametf = new JTextField();
                center.add(stdnametf);
                stdnametf.setColumns(10);
                
                JLabel departname = new JLabel("과목 번호 :");
                center.add(departname);
                
                stdnotf = new JTextField();
                center.add(stdnotf);
                stdnotf.setColumns(10);
               
                JLabel nlb4 = new JLabel("배정 학점 :");
                center.add(nlb4);
                
                subtottf = new JTextField();
                center.add(subtottf);
                subtottf.setColumns(10);
        
                JLabel subgrade = new JLabel("과목 등급 :");
                center.add(subgrade); 
                
                tf5 = new JTextField(); 
                center.add(tf5);
                tf5.setColumns(10);
                
                JLabel stdname = new JLabel("총점 :");
                center.add(stdname);
                
                departnametf = new JTextField();
                center.add(departnametf);
                departnametf.setColumns(10);

                JLabel subname = new JLabel("평균 :");
                center.add(subname);
                
                subnametf = new JTextField();
                center.add(subnametf);
                subnametf.setColumns(10);

                JLabel profname = new JLabel("평점 :");
                center.add(profname);
                
                profnametf = new JTextField();
                center.add(profnametf);
                profnametf.setColumns(10);
                
                JLabel totgrade = new JLabel("통합 등급 :");
                center.add(totgrade);
                
                totgradetf = new JTextField();
                center.add(totgradetf);
                totgradetf.setColumns(10);
                
                JLabel savepoint = new JLabel("획득 학점 :");
                center.add(savepoint);
                
                savepointtf = new JTextField();
                center.add(savepointtf);
                savepointtf.setColumns(10);
               
        }

        public void makeBottomPanel(){
        	
                JPanel bottom = new JPanel();
                add(bottom, BorderLayout.SOUTH);
                
                JButton regist = new JButton("등록");
                regist.addActionListener(new ActionListener() {
                	public void actionPerformed(ActionEvent e) {
                
                	}
                });
                bottom.add(regist);
               
                JButton btn1 = new JButton("수정완료");
                btn1.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
    
                	}
         
                });
 
        }
 
        }
